<?php
/***********************************************************************
 * @package    	IvanEngine
 * @subpackage 	Core
 * @author     	Ivan <ivanzx@msn.com>
 * @created    	2010-05-17
 ***********************************************************************/
if(defined("IVANENGINE_CORE_EXCEPTION_INVALIDARGUMENT"))
	die("Redefinition macro in :".__FILE__."(".__LINE__.")");
define("IVANENGINE_CORE_EXCEPTION_INVALIDARGUMENT", true);

require_once (dirname(__FILE__).'/Exception.php');

class CExceptionInvalidArgument extends CException 
{
	public function __construct($message)
	{
		$numargs 	= func_num_args();
		if ($numargs >= 2) {
			$arg_list 	= func_get_args();
			$temp_args	= array();
			for ($i = 1; $i < $numargs; $i++) {
				$temp_args[$i-1] = $arg_list[$i];
    		}
    		$this->m_message = vsprintf($message, $temp_args);
		}else{
			$this->m_message = $message;
		}
		Exception::__construct ($this->m_message);
	}
}
?>